<template>
<div class="container">
  <homeCard @goMore="goMore">
    <span slot="title">
       <i class="iconfont icon-a-5 home-card-title-i"></i>
      <span class="home-card-title">通知公告</span>
    </span>
    <announcementItem class="announcementItem" :params="item" v-for="(item,index) in tableData" :key="index"></announcementItem>
  </homeCard>
</div>
</template>

<script>
import homeCard from "@/views/Home/module/homeCard";
import announcementItem from "@/views/Home/module/announcementItem";
export default {
  name: "announcement",
  components:{
    homeCard,
    announcementItem
  },
  mounted() {
    this.announcementQuery()
  },
  data(){
    return {
      tableData:[],
    }
  },
  methods:{
    goMore(){
      this.$router.push({name:'newsList',query:{columnId:10}})
    },
    announcementQuery(){
      let params = {
        col:10,
        "page": 0,
        "pageSize": 6
      }
      this.$api.paginHome(params).then(res=>{
        console.log(6666,res.data.data)
        this.tableData = res.data.data
      })
    },
  }
}
</script>

<style scoped lang="less">
.container{
  cursor: pointer;
  width: 44.7rem;
  height: 43.3rem;
  // height: 33.3rem;
  .announcementItem{
    margin-bottom: 3rem;
    // margin-bottom: 2rem;
    &:last-child{
      margin-bottom: 0;
    }
  }
}
</style>